<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <base target="_self"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jqGrid/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="<%=path %>/jslib/jquery.validate.min.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js" defer="defer"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/jquery.form.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/additional-methods.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
    <c:if test="${requestScope.message!=null}">
		<script type="text/javascript">
 	 		     alert('<c:out value="${requestScope.message}"></c:out>');
 	 		     window.close();
 		</script>
	</c:if>
	
    <script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    var stateValue="";
    $().ready(function(){
			var options = {
		  	    url:'<%=request.getContextPath() %>/shebeiweibaojiluAction!updateweibao.action?id='+${shebeiweibao.id},
		  	     beforeSubmit: function() {
		   				return true;
		    			},
		  	    dataType:'json',
		  	    success: function(data) {
		  	    //alert(data);
		  	      if(data.result=='success'){
					alert("修改成功");
				//	window.close();
					api.close();
					W.refreshIt();
		  	      }
		  	    }};
		$('#saveBtn').click(function(){
			alert(1);
			    	$('#pageFrom').ajaxSubmit(options);
	 	            return false;
    	 });
    	$('#closeBtn').click(function(){
    		api.close();
			//window.close();
		});
		
	});
	
	
	
	
   </script>
 	<style type="text/css">
 		body{
 			background:#ffffff; background-image:url(images/);
 		}
   		html{
		    overflow-x: hidden;
			overflow-y: hidden;
		}  	
		.formTableNew textarea{border: 1px solid #999;padding: 5px;width: 760px;-moz-border-radius: 3px;border-radius: 3px;margin-bottom: 5px;color: #666;background: url(../images/input_bg.gif) repeat-x top;}
   </style>
  </head>
  
  <body>
	<form id="pageFrom" action="" enctype="multipart/form-data" method="post">
		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew" style="padding-top: 20px">
  			<tr>
  			  <td align="right">设备名称：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="shebeiname" maxlength="50" name="shebeiname" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.shebeiname }" />
  			  </td>
  			  <td align="right">设备编号：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="shebeino" maxlength="50" name="shebeino" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.shebeino }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">维保项目：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="weibaoxiangmu" maxlength="50" name="weibaoxiangmu" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.weibaoxiangmu }" />
  			  </td>
  			  <td align="right">规格型号：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="guigexinghao" maxlength="50" name="guigexinghao"  style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.gugexinghao }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">实施人员：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="shishirenyuan" maxlength="50" name="shishirenyuan" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.shishirenyuan }" />
  			  </td>
  			  <td align="right">部门：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly"  id="bumenname" maxlength="50" name="bumenname"  style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.bumenname }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">维保工时：</td>
  			  <td align="left">
  			    <input  type="text" id="weibaogongshi" maxlength="50" name="weibaogongshi" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.weibaogongshi }" />
  			  </td>
  			  <td align="right">维保成本：</td>
  			  <td align="left">
  			  	 <input  type="text" readonly="readonly" id="weibaochengben" maxlength="50"  name="weibaochengben" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.weibaochengben }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">计划维保时间：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="jihuaweibaotime" maxlength="50" name="jihuaweibaotime" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.jihuaweibaotime }" />
  			  </td>
  			  <td align="right">实际维保时间：</td>
  			  <td align="left">
  			    <input  type="text" id="shijiweibaotime" maxlength="50" name="shijiweibaotime" onClick="WdatePicker()" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.shijiweibaotime }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">备件更换情况描述: </td>
  			  <td align="left">
  			    <input  type="text" id="genghuanmiaoshu" maxlength="50" name="genghuanmiaoshu"  style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.genghuanmiaoshu }" />
  			  </td>
  			 <td align="right">备件出库单号：</td>
  			  <td align="left">
  			    <input  type="text" readonly="readonly" id="chukudanhao" readonly maxlength="50" name="chukudanhao" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.chukudanhao }" />
  			  </td>
  			</tr>
 			<tr>
  			  <td align="right">异常处置情况:</td>
  			  <td align="left">
  			    <input  type="text"  id="yichangchuzhi"  maxlength="50" name="yichangchuzhi" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.yichangchuzhi }" />
  			  </td>
  			  <td align="right">维护保养建议：</td>
  			  <td align="left">
  			    <input  type="text"  id="weibaojianyi"  maxlength="50" name="weibaojianyi" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${shebeiweibao.weibaojianyi }"/>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">附件：</td>
  			  <td align="left">
  			  	<jsp:include page="../fileupload/attachment.jsp?id=${shebeiweibao.id}&column=fujian&show=n" ></jsp:include>
  			  </td>
  			</tr>
		</table>
		<table width="100%" border="0" align="center" class="formTableNew">
		  <tr>   
			<td align="center">
		    	<input id="saveBtn" type="button" value="提 交" class="form_bt_orange" />
		    	<input type="button" id="closeBtn" value="取 消" class="form_bt_grey" />
		    </td>
		  </tr>
		</table>
		</form>
  </body>
</html>
